import express from 'express'
import {
  createTemplate,
  deleteTemplate,
  getTemplate,
  updateTemplate,
} from '../controllers/notificationTemplate.controller'
import { adminAuth, auth } from '../middleware/auth'

const router = express.Router()

// 只有管理员可以管理模板
router.post('/', auth, adminAuth, createTemplate)
router.put('/:code', auth, adminAuth, updateTemplate)
router.delete('/:code', auth, adminAuth, deleteTemplate)
router.get('/:code', auth, getTemplate)

export default router
